var stu={
    id:1000,
    name:"temo",
    _money:8000
}

Object.defineProperty(stu,"_money",{
    enumerable:false
})
Object.defineProperty(stu,"bank",{
    get:function(){
        console.log('建行余额=',this._money)
    },
    set:function(v){
        if(v<=-500){
            console.log('不允许大额取钱');
            return ;
        }
        this._money+=v
        console.log('修改余额',this._money);
    },

    enumerable:true,
    configurable:true
})

stu.bank=-400;
console.log(stu);

for(let s in stu){
    console.log(s);
}